package apibasej.server.db;

import apibasej.server.db.to.StatementQuery;
import apibasej.server.db.to.StatementValues;
import apibasej.shared.config.Config;
import apibasej.shared.config.ConfigConsumer;

public abstract class GenericTransaction extends ConfigConsumer{

	public GenericTransaction() {
	}
	
	public GenericTransaction(Config c) {
		super(c);
	}
	
	protected abstract int executeUpdate(StatementValues sv) throws Exception; // INSERT, UPDATE ou DELETE
	
	protected abstract CursorSelect executeQuery(StatementQuery sv) throws UtilDBException; // SELECT
	
	protected abstract void verifyCloseForUtilDB(boolean isError);
	
}
